package com.xinqi.modules.course.classmenu.client;

import com.xinqi.common.base.constants.ServiceNameConstants;
import com.xinqi.common.base.response.PageInfo;
import com.xinqi.common.base.response.R;
import com.xinqi.common.core.enums.CourseContentTypeEnum;
import com.xinqi.modules.course.classmenu.dto.req.ClassMenuQueryDTO;
import com.xinqi.modules.course.classmenu.dto.rsp.ClassMenuResultDTO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * 课程中版块设置表客户端
 *
 * @author: linkai
 * @date: 2023/10/25
 */
@FeignClient(contextId = "classMenuClient", value = ServiceNameConstants.XQ_COURSE)
public interface ClassMenuClient {
    String INNER_PREFIX = "/inner/class-menu";

    /**
     * 课程中版块设置表-分页
     */
    @GetMapping(INNER_PREFIX + "/page")
    R<PageInfo<ClassMenuResultDTO>> page(ClassMenuQueryDTO dto);

    /**
     * 课程中版块设置表-详情
     */
    @GetMapping(INNER_PREFIX + "/{id}")
    R<ClassMenuResultDTO> findById(@PathVariable("id") Long id);

    @GetMapping(INNER_PREFIX + "/checkShowCourseContent/{classId}")
    R<Void> checkShowCourseContent(@PathVariable("classId") Long classId, @RequestParam("contentType") CourseContentTypeEnum contentType);

}
